package com.xmy.cultivate.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 加订表
 * </p>
 *
 * @author hpiggy
 * @since 2024-07-30
 */
@TableName("store_goods_order")
@ApiModel(value = "StoreGoodsOrder对象", description = "加订表")
@Data
public class StoreGoodsOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty("批次号")
    private Long batchNum;

    private String name;

    @ApiModelProperty("年份")
    private Integer yearPart;

    @ApiModelProperty("学期")
    private Integer quarterNum;

    @ApiModelProperty("类型id，对应类型表")
    private Long goodsTypeId;

    @ApiModelProperty("校区id")
    private Long schoolId;

    @ApiModelProperty("班型")
    private Long classTypeId;

    private Long subjectsId;

    @ApiModelProperty("年级")
    private Integer yearClassId;

    @ApiModelProperty("1精品课，2智能课，3刷题班")
    private Integer lessonType;

    private Integer lessonNum;

    @ApiModelProperty("数量")
    private Integer goodsCount;

    @ApiModelProperty("1入库添加，2加订添加")
    private Integer type;

    @ApiModelProperty("0未确认，1已确认、未下单，2已下单，3已入库")
    private Integer status;

    @ApiModelProperty("单价")
    private BigDecimal unitPrice;

    @ApiModelProperty("总价")
    private BigDecimal allPrice;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("创建人id")
    @TableField(fill = FieldFill.INSERT)
    private Long createdId;

    @TableLogic
    private Integer deleted;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime updatedAt;

    @TableField(exist = false)
    private String schoolName;

    @TableField(exist = false)
    private String classTypName;

    @TableField(exist = false)
    private String yearClassName;
}
